#ifndef __MEBSP_PWM_H
#define __MEBSP_PWM_H 			   
  
#include "at32f403a_407.h"
#include <stdint.h>

#define MB_PWM_TOTAL_CH_NUM (6)

typedef struct
{
  uint16_t wNowVal[MB_PWM_TOTAL_CH_NUM];
  uint16_t wOldVal[MB_PWM_TOTAL_CH_NUM];
  uint16_t wOutVal[MB_PWM_TOTAL_CH_NUM][64];
  
  uint16_t wDivVal;
  uint16_t wPeriodVal;
  uint8_t bDimmerDelayEnable;

  uint32_t wCurveParVal[3];

}_MB_PWM_T;

extern _MB_PWM_T MB_PWM;

extern void MeBsp_PWM_Init(void);
extern void MeBsp_PWM_Hanl(void);

#endif





























